/*
Copyright (C) Ariff Ehsan, Abdul Hadi Fikri

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

/*  Author : Ariff Ehsan
 *  Date   : June 22, 2009
 *
 *  Log    : Jan 11, 2010 ? ariff ehsan
 *           - code cleanup
 *           - add new macro LEDS4_SHIFT
 *           - remove macro LEDS4_MSB
 */


#ifndef __LEDS4_H__
#define __LEDS4_H__


#include <system.h>

#ifndef LEDS4_PORT
#warning LEDS4_PORT is set to default value (PORTC)
#define LEDS4_PORT   PORTC
#endif

#ifndef LEDS4_DDR
#warning LEDS4_DDR is set to default value (DDRC)
#define LEDS4_DDR    DDRC
#endif


/*#define LEDS4_LED0   PC1
#define LEDS4_LED1   PC2
#define LEDS4_LED2   PC3
#define LEDS4_LED3   PC4

#define LEDS4_GREEN   PC1
#define LEDS4_YELLOW  PC2
#define LEDS4_ORANGE  PC3
#define LEDS4_RED     PC4*/


/**
 *  define LEDS4_SHIFT value in your anos_config.h file to shfit the starting
 *  bit of LEDS4 pins.
 */


/**
 *  LEDS4 initialization
 *  - MUST be called before using LEDS4 commands
 */
void LEDS4_init(void);


/**
 *  Turn ON single LED pin
 *  @pin - targeted pin 
 */
void LEDS4_on(uint8_t pin);


/**
 *  Turn OFF single LED pin
 *  @pin - targeted pin 
 */
void LEDS4_off(uint8_t pin);


/**
 *  Toggle single LED pin
 *  @pin - targeted pin 
 */
void LEDS4_toggle(uint8_t pin);


/**
 *  Set value on LEDS port
 *  @value - value for LEDS port 
 */
void LEDS4_set(uint8_t value);


#endif // __LEDS4_H__
